<?php
/**
 * User: xingleixu@163.com
 * Date: 2017/10/18
 * Time: 10:37
 */

namespace App\Model;

class Article
{
    public function getTop($num = 10)
    {
        //原则上模型跟DB类打交道，让DB类帮忙数据库存取数据，现用硬编码替代
        return [
            ['id' => 1, 'title' => '文章标题1', '文章内容1'],
            ['id' => 2, 'title' => '文章标题2', '文章内容2'],
            ['id' => 3, 'title' => '文章标题3', '文章内容3'],
            ['id' => 4, 'title' => '文章标题4', '文章内容4'],
            ['id' => 5, 'title' => '文章标题5', '文章内容5'],
            ['id' => 6, 'title' => '文章标题6', '文章内容6'],
            ['id' => 7, 'title' => '文章标题7', '文章内容7'],
            ['id' => 8, 'title' => '文章标题8', '文章内容8'],
            ['id' => 9, 'title' => '文章标题9', '文章内容9'],
            ['id' => 10, 'title' => '文章标题10', '文章内容10']
        ];

    }


}